# 类实现计算器
class MyMath:
    def add(self, a, b):
        return a + b

    def sub(self, a, b):
        return a - b

    def mul(self, a, b):
        return a * b

    def div(self, a, b):
        return a / b

    def exdiv(self, a, b):
        return a // b

    def rem(self, a, b):
        return a % b

    def pow(self, a, b):
        return a ** b

# 类的实现
class Person(object):
    def eat(self):
        print("I can eat")
    def sleep(self):
        print("I can sleep")
    def __init__(self, name):
        self.name = name
# 类的实例化
jack = Person("Jack")
Lihua = Person("Lihua")


# 类的继承
class Chinese(Person):
    def unity(self):
        print("我们团结一心")

class Japanese(Person):
    def baga(self):
        print("八嘎呀路")



